package jtk.project4.fleet.field;

import java.awt.FlowLayout;

import jtk.project4.fleet.domain.Odometer;


import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.TableField;
import nl.coderight.jazz.form.field.table.TableFieldColumn;


public class MeterReplacementsField  extends GroupControl<String>{
	private TableField<Odometer> field1;
	private TableFieldColumn identification;
	private TableFieldColumn date;
	private TableFieldColumn currentReading;
	private TableFieldColumn replacementReading;
	private TableFieldColumn description;
	
	
	public MeterReplacementsField(String bindID){
		setBindID(bindID);
		createFields();
		createLayout();

		
	}
	
	private void createFields(){
		field1 = new TableField<Odometer>("odometers","odometer");
		
		field1.addColumn("Unit","odId");
		field1.addColumn("Year","createDate");
		field1.addColumn("Current Reading","currentMeter");
		field1.addColumn("Replacement Reading","replacementMeter");
		field1.addColumn("Description","desc");
			
	}
	
	private GroupControl createTableFieldColumn() {
		GroupControl TableFieldColumn = new GroupControl();
		TableFieldColumn.setLayout(new FlowLayout(FlowLayout.LEFT));
		TableFieldColumn.focusField(field1);
		return TableFieldColumn;
	}

	private void createLayout() {
		setLayout(new FormLayout ())
		.addField(field1)
		.addRow()
		.addHorizontalSeparator()
		.addRow()
		
		;
	}
	
}


